<?php
namespace Home\Util\lib;


class API {

    /*
     * 书籍移动
     * ID 书籍id
     * SGCODE 要移动到达的书柜位置代码
     */
    public function RUKU($ID, $SGCODE) {
        $OK = 0;
        $LS = Service('API', 'book', 'Home1');
        $where['ID'] = $ID;
        $BookData = $LS->find($where);
        if ($BookData) {
            $save['WZ_CODE'] = $SGCODE;
            $save['OLD_WZ_CODE'] = $BookData['WZ_CODE'];
            $save['STATE'] = '入库';
            $OK = $LS->update($where, $save);
        }
        return $OK;
    }


}
